package com.example.practice4.Entity;

import lombok.Data;
import org.springframework.security.crypto.password.PasswordEncoder;



@Data
public class Register {

    private String username;
    private String password;

    public User toUser(PasswordEncoder passwordEncoder){
        return  new User(username,passwordEncoder.encode(password));
    }
}
